<?php

namespace App\Http\Requests\Api;

use App\Http\Requests\BaseRequest;

class PermisionRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required',
            'cn_name' => 'required',
            'menu_id' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '路由名不能为空',
            'cn_name.required' => '权限名不能为空',
            'menu_id.required' => '所属菜单不能为空',
        ];
    }
}
